package com.huicoo.forestmanager.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.huicoo.forestmanager.R;
import com.huicoo.forestmanager.network.bean.patrol.RecordlistBean;

import java.util.List;

/**
 * --------- 日期 ------- 维护人 ------------ 变更内容 --------
 * 2019/4/5		    Administrator
 */
public class PatrolRecordChildAdapter extends BaseQuickAdapter<RecordlistBean.Data, BaseViewHolder> {

    public PatrolRecordChildAdapter(@Nullable List<RecordlistBean.Data> data) {
        super(R.layout.adapter_patrol_record_chil_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, RecordlistBean.Data item) {
        //设置时间
        helper.setText(R.id.time, item.getStartTime());

        //设置标题
        helper.setText(R.id.title, item.getRecordSituation());


        //设置内容
        helper.setText(R.id.content,
                item.getPosition()
                        + "  " + item.getUserName()
                        + "  耗时" + item.getDifTime()
        );

    }
}
